package com.source.lightfowl.utils;

import java.util.ArrayList;

/**
 * @Author: 谢春泳
 * @Description:
 * @Date: 2020/1/10 12:11
 */
public class StringTOArrayList {

    public static ArrayList<Integer> toArrayList(String ids){
        String[] strings = ids.split(",");
        ArrayList<Integer> list = new ArrayList<>();
        for (int i = 0; i <strings.length ; i++) {
            list.add(Integer.parseInt(strings[i]));
        }
        return list;
    }

    public static ArrayList<String> toStringArrayList(String ids){
        String[] strings = ids.split(",");
        ArrayList<String> list = new ArrayList<>();
        for (int i = 0; i <strings.length ; i++) {
            list.add(strings[i]);
        }
        return list;
    }
}
